//
//  AboutViewController.m
//  PaiLeXiongProject   //
//  Created by 小獾科技 on 2017/9/8.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@property (nonatomic, strong) UILabel *textLabel;
@end

@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addBackItem];
    self.title = @"关于我们";
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(83, 38, GWIDTH - 83 * 2, 30)];
//    label.text = @"关于派乐熊应用程序";
    label.textColor = ColorFrom16(0x333333);
    label.font = PFMFONT(22);
    label.textAlignment = 1;
    [self.view addSubview:label];
    
    _textLabel = [[UILabel alloc] initWithFrame:CGRectMake(18, 92, GWIDTH - 36, 230)];
//    textLabel.text = @"派乐熊是一款亲子生活优选服务平台。我们希望通过这个平台帮助家长改善育儿经验，提高育儿知识、理念。将派乐熊融入家长和孩子们的生活当中。为了更好的加深与家长、孩子们的互动，[派乐熊]专门开设了0元体验活动，线上预订，线下实体店，二维码扫描体验。还精心准备了日记，每周推出一期，让妈妈在闲暇时间，了解更多的育儿知识和经验。派乐熊会随着社会的发展不断完善，其目的和宗旨是为更多妈妈提供更优质的服务。";
    _textLabel.numberOfLines = 0;
    _textLabel.textColor = ColorFrom16(0x616161);
    _textLabel.font = PFRFONT(16);
    [self.view addSubview:_textLabel];
    
    UILabel *bottomLabel = [UILabel new];
    bottomLabel.text = @"Copyright@2016-2018";
    bottomLabel.textColor = ColorFrom16(0x949494);
    bottomLabel.font = PFRFONT(12);
    bottomLabel.textAlignment = 1;
    [self.view addSubview:bottomLabel];
    [bottomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.view).offset(-86);
        make.width.equalTo(@259);
        make.height.equalTo(@16);
        make.centerX.equalTo(self.view.mas_centerX);
    }];
    
    UILabel *alabel = [UILabel new];
    alabel.text = @"哈尔滨派乐熊科技有限公司";
    alabel.textColor = ColorFrom16(0x949494);
    alabel.font = PFRFONT(12);
    alabel.textAlignment = 1;
    [self.view addSubview:alabel];
    [alabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(bottomLabel.mas_bottom).offset(3);
        make.width.equalTo(@259);
        make.height.equalTo(@16);
        make.centerX.equalTo(self.view.mas_centerX);
    }];
    [self startNetwork];
}

- (void)startNetwork
{
    [NetWork sendGetRequestURL:[NSString stringWithFormat:@"%@/my/about", GW_Domain] parameters:nil completionBlockWithSuccess:^(NSDictionary *resultDict) {
        NSLog(@"关于我们%@", resultDict);
        _textLabel.text = resultDict[@"data"];
    } andFailure:^(NSError *error, NSString *errorMsg) {
        NSLog(@"%@", error);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
